package com.example.helloword.utli;

import android.widget.ImageView;

import androidx.databinding.BindingAdapter;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;

public class BindingOfGlideUtli {
    @BindingAdapter("app:imageUrl")
    public static void loadImage(ImageView imageView, String url){
        Glide.with(imageView.getContext())
                .load(url)
                .apply(new RequestOptions()
                        .transforms(new RoundedCorners(30)
                        ))
                .into(imageView);

    }
}
